package cn.wolfcode.enums;

import lombok.Getter;

@Getter
public enum AppointmentStatusEnum {
    PEND("待确认",0),
    PERFORM("履行中",1),
    CONSUME("消费中",2),
    FINISH("归档",3),
    FAILURE("废弃",4);

    private Integer value;
    private String name;

    AppointmentStatusEnum(String name, Integer value) {
        this.name=name;
        this.value=value;
    }

    public static String findName(Integer value){
        AppointmentStatusEnum[] enums = values();
        for (AppointmentStatusEnum anEnum : enums) {
            if(anEnum.getValue().equals(value)){
                return anEnum.getName();
            }
        }
        return null;
    }
}
